﻿<%@ Page Language="vb" AutoEventWireup="false" CodeBehind="showLocationsByUser.aspx.vb" Inherits="HauntedNetworkingSite.showLocationsByUser" %>

<%@ Register src="Banner.ascx" tagname="Banner" tagprefix="uc1" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
    <div>
    
        <uc1:Banner ID="Banner1" runat="server" />
        <br />
        <br />
        <br />
        <br />
        <br />
        <br />
        <br />
        <br />
        <br />
        <br />
        <br />
        <br />
        <br />
        <br />
        <br />
        <br />
    
        <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" 
            DataSourceID="SqlDataSource1" CssClass="gridclass" AllowPaging="True" 
            AllowSorting="True" DataKeyNames="ID" Width="80%" GridLines="Horizontal" HorizontalAlign="Center" HeaderStyle-CssClass="titleClass">
            <Columns>
                <asp:ImageField DataImageUrlField="Picture" HeaderText="Picture">
                </asp:ImageField>
                <asp:BoundField DataField="Area" HeaderText="Area" SortExpression="Area" />
                <asp:BoundField DataField="City" HeaderText="City" SortExpression="City" />
                <asp:BoundField DataField="Country" HeaderText="Country" 
                    SortExpression="Country" />
                <asp:HyperLinkField DataNavigateUrlFields="ViewOnGoogleMaps" 
                    DataTextField="ViewOnGoogleMaps" DataTextFormatString="Map" 
                    HeaderText="View On Map" />
                <asp:HyperLinkField DataNavigateUrlFields="ID" 
                    DataNavigateUrlFormatString="details.aspx?ID={0}" 
                    DataTextFormatString="Full Story" HeaderText="Story" Text="Full Story" />
                <asp:BoundField DataField="Views" HeaderText="Views" SortExpression="Views" />
            </Columns>
        </asp:GridView>
        <asp:SqlDataSource ID="SqlDataSource1" runat="server" 
            ConnectionString="<%$ ConnectionStrings:PlacesConnectionString %>" 
            ProviderName="<%$ ConnectionStrings:PlacesConnectionString.ProviderName %>" 
            
            
            SelectCommand="SELECT [ID], [Picture], [Area], [City], [Country], [ViewOnGoogleMaps], [Description], [Views] FROM [locations] WHERE ([UserName] = ?)">
            <SelectParameters>
                <asp:QueryStringParameter Name="UserName" QueryStringField="UserName" 
                    Type="String" />
            </SelectParameters>
        </asp:SqlDataSource>
    
    </div>
    </form>
</body>
</html>
